<?php 
	/*
	Plugin Name: Footfall Growth Calculator
	Plugin URI: http://www.swofmedia.co.uk
	Description: Plugin for displaying Footfall Growth Calculator
	Author: Andrew Frazier
	Version: 2.0
	Author URI: http://www.swofmedia.co.uk

	Copyright 2013  Swofmedia  (email : info@swofmedia.co.uk)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as 
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

	*/


// Add Shortcode
function ff_growth_calculator() {
	$output = '<a href="calc.php" onclick="ttmb.box.show({iframe:\''.plugins_url( 'calc.php' , __FILE__ ).'\',width:855,height:590});return false;"><img src="'.plugins_url( 'img/calculator-button-icon.png' , __FILE__ ).'" title="'. __( 'Open Growth Calculator','ff-growth-calculator').'" height="42" width="42" alt="'. __( 'Open Growth Calculator','ff-growth-calculator').'" /></a>';
	return $output;
}
add_shortcode( 'growth_calculator', 'ff_growth_calculator' );

add_action( 'wp_enqueue_scripts', 'register_stylesheets' );
function register_stylesheets() {
	wp_register_style( 'ff_growth_calculator', plugins_url( 'css/ttmbox.css' , __FILE__ ) );
	wp_enqueue_style( 'ff_growth_calculator' );
}

add_action( 'wp_enqueue_scripts', 'register_script' );
function register_script() {
	wp_enqueue_script( 'my-js', plugins_url("js/ttmbox.js", __FILE__), false );
}

function growth_calculator_init() {
	$plugin_dir = basename(dirname(__FILE__)) . '/languages/';
	load_plugin_textdomain( 'ff-growth-calculator', false, $plugin_dir );
}
add_action('plugins_loaded', 'growth_calculator_init');

/* =====  OPTIONS PAGE ===== */
require('ff_options.php');